package com.itheima.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.TbContract;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * (TbContract)表数据库访问层
 */
public interface TbContractDao extends BaseMapper<TbContract> {
    Integer getByTime(@Param("startTime") Date startTime,@Param("nextTime")Date nextTime);

    Integer getByTimeAndStatus(
            @Param("startTime") Date startTime,
            @Param("nextTime")Date nextTime,
            @Param("status")String status
            );

    List <Double>  getContractOrderByTimeAndStatus(
            @Param("startTime") Date startTime,
            @Param("nextTime")Date nextTime,
            @Param("status")String status
    );

    List<TbContract> selectByChannel(@Param("channel") String dictValue);

    List<TbContract> selectByDeptId(@Param("deptId") String deptId);

    List<TbContract> selectByUserId(@Param("userId") String userId);
}

